package com.weacar.weixin.util.sms;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author fangxing <fangxing@weacar.com>
 */
public abstract class SmsService {
    private static final Logger LOG = LoggerFactory.getLogger(SmsService.class);


    /**
     * 请求手机验证码
     *
     * @param fromUserName
     * @param mobile
     */
    public abstract void sendSmsCode(String fromUserName, String mobile) throws SmsServiceException;

    /**
     * 验证手机验证码
     *
     *
     * @param mobile
     * @param code
     * @return
     */
    public abstract boolean isSmsCodeValid(String fromUserName, String mobile, String code);


    public abstract void sendText(String mobile, String text) throws SmsServiceException;
}
